<template>
    <div>
        I am parent component {{ age }}
    </div>

    <div>
      <ProvideInjectChild></ProvideInjectChild>
    </div>
</template>

<script lang="ts" setup>
import ProvideInjectChild from './ProvideInjectChild.vue'
import { provide, ref } from 'vue';

const age = ref(18)


function changeAge(value: number) {
    age.value = value
}
provide('age', age)
provide('changeAge', changeAge)
</script>